using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._UtilityNetworkTools._Administration
{
    /// <summary>
    /// <para>Export Rules</para>
    /// <para>Exports connectivity, structural attachment, and containment rules from a utility network into a comma-separated values file.</para>
    /// <para>将公共设施网络中的连通性、结构附件和包含规则导出到逗号分隔值文件中。</para>
    /// </summary>    
    [DisplayName("Export Rules")]
    public class ExportRules : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ExportRules()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_utility_network">
        /// <para>Input Utility Network</para>
        /// <para>The utility network to export the rules from.</para>
        /// <para>要从中导出规则的公共设施网络。</para>
        /// </param>
        /// <param name="_rule_type">
        /// <para>Rule Type</para>
        /// <para><xdoc>
        ///   <para>The type of rule to export.</para>
        ///   <bulletList>
        ///     <bullet_item>All—All the rules in the utility network will be exported.</bullet_item><para/>
        ///     <bullet_item>Junction-junction connectivity—Junction-junction connectivity association rules will be exported.</bullet_item><para/>
        ///     <bullet_item>Junction-edge connectivity—Junction-edge connectivity rules will be exported.</bullet_item><para/>
        ///     <bullet_item>Containment—Containment association rules will be exported.</bullet_item><para/>
        ///     <bullet_item>Structural attachment—Structural attachment association rules will be exported.</bullet_item><para/>
        ///     <bullet_item>Edge-junction-edge connectivity—Edge-junction-edge connectivity association rules will be exported.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要导出的规则类型。</para>
        ///   <bulletList>
        ///     <bullet_item>全部—将输出公共设施网络中的所有规则。</bullet_item><para/>
        ///     <bullet_item>交汇点-交汇点连通性—将输出交汇点-交汇点连通性关联规则。</bullet_item><para/>
        ///     <bullet_item>交汇点-边连通性—将导出交汇点-边连通性规则。</bullet_item><para/>
        ///     <bullet_item>遏制 - 将导出遏制关联规则。</bullet_item><para/>
        ///     <bullet_item>结构附件—将输出结构附件关联规则。</bullet_item><para/>
        ///     <bullet_item>边-交汇点-边连通性 - 将输出边-交汇点-边连通性关联规则。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_csv_file">
        /// <para>Output File</para>
        /// <para>The folder location and name of the .csv file to be created.</para>
        /// <para>要创建的.csv文件的文件夹位置和名称。</para>
        /// </param>
        public ExportRules(object _in_utility_network, _rule_type_value? _rule_type, object _out_csv_file)
        {
            this._in_utility_network = _in_utility_network;
            this._rule_type = _rule_type;
            this._out_csv_file = _out_csv_file;
        }
        public override string ToolboxName => "Utility Network Tools";

        public override string ToolName => "Export Rules";

        public override string CallName => "un.ExportRules";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_utility_network, _rule_type.GetGPValue(), _out_csv_file];

        /// <summary>
        /// <para>Input Utility Network</para>
        /// <para>The utility network to export the rules from.</para>
        /// <para>要从中导出规则的公共设施网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Utility Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_utility_network { get; set; }


        /// <summary>
        /// <para>Rule Type</para>
        /// <para><xdoc>
        ///   <para>The type of rule to export.</para>
        ///   <bulletList>
        ///     <bullet_item>All—All the rules in the utility network will be exported.</bullet_item><para/>
        ///     <bullet_item>Junction-junction connectivity—Junction-junction connectivity association rules will be exported.</bullet_item><para/>
        ///     <bullet_item>Junction-edge connectivity—Junction-edge connectivity rules will be exported.</bullet_item><para/>
        ///     <bullet_item>Containment—Containment association rules will be exported.</bullet_item><para/>
        ///     <bullet_item>Structural attachment—Structural attachment association rules will be exported.</bullet_item><para/>
        ///     <bullet_item>Edge-junction-edge connectivity—Edge-junction-edge connectivity association rules will be exported.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要导出的规则类型。</para>
        ///   <bulletList>
        ///     <bullet_item>全部—将输出公共设施网络中的所有规则。</bullet_item><para/>
        ///     <bullet_item>交汇点-交汇点连通性—将输出交汇点-交汇点连通性关联规则。</bullet_item><para/>
        ///     <bullet_item>交汇点-边连通性—将导出交汇点-边连通性规则。</bullet_item><para/>
        ///     <bullet_item>遏制 - 将导出遏制关联规则。</bullet_item><para/>
        ///     <bullet_item>结构附件—将输出结构附件关联规则。</bullet_item><para/>
        ///     <bullet_item>边-交汇点-边连通性 - 将输出边-交汇点-边连通性关联规则。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Rule Type")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _rule_type_value? _rule_type { get; set; }

        public enum _rule_type_value
        {
            /// <summary>
            /// <para>All</para>
            /// <para>All—All the rules in the utility network will be exported.</para>
            /// <para>全部—将输出公共设施网络中的所有规则。</para>
            /// </summary>
            [Description("All")]
            [GPEnumValue("ALL")]
            _ALL,

            /// <summary>
            /// <para>Junction-junction connectivity</para>
            /// <para>Junction-junction connectivity—Junction-junction connectivity association rules will be exported.</para>
            /// <para>交汇点-交汇点连通性—将输出交汇点-交汇点连通性关联规则。</para>
            /// </summary>
            [Description("Junction-junction connectivity")]
            [GPEnumValue("JUNCTION_JUNCTION_CONNECTIVITY")]
            _JUNCTION_JUNCTION_CONNECTIVITY,

            /// <summary>
            /// <para>Junction-edge connectivity</para>
            /// <para>Junction-edge connectivity—Junction-edge connectivity rules will be exported.</para>
            /// <para>交汇点-边连通性—将导出交汇点-边连通性规则。</para>
            /// </summary>
            [Description("Junction-edge connectivity")]
            [GPEnumValue("JUNCTION_EDGE_CONNECTIVITY")]
            _JUNCTION_EDGE_CONNECTIVITY,

            /// <summary>
            /// <para>Containment</para>
            /// <para>Containment—Containment association rules will be exported.</para>
            /// <para>遏制 - 将导出遏制关联规则。</para>
            /// </summary>
            [Description("Containment")]
            [GPEnumValue("CONTAINMENT")]
            _CONTAINMENT,

            /// <summary>
            /// <para>Structural attachment</para>
            /// <para>Structural attachment—Structural attachment association rules will be exported.</para>
            /// <para>结构附件—将输出结构附件关联规则。</para>
            /// </summary>
            [Description("Structural attachment")]
            [GPEnumValue("STRUCTURAL_ATTACHMENT")]
            _STRUCTURAL_ATTACHMENT,

            /// <summary>
            /// <para>Edge-junction-edge connectivity</para>
            /// <para>Edge-junction-edge connectivity—Edge-junction-edge connectivity association rules will be exported.</para>
            /// <para>边-交汇点-边连通性 - 将输出边-交汇点-边连通性关联规则。</para>
            /// </summary>
            [Description("Edge-junction-edge connectivity")]
            [GPEnumValue("EDGE_JUNCTION_EDGE_CONNECTIVITY")]
            _EDGE_JUNCTION_EDGE_CONNECTIVITY,

        }

        /// <summary>
        /// <para>Output File</para>
        /// <para>The folder location and name of the .csv file to be created.</para>
        /// <para>要创建的.csv文件的文件夹位置和名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_csv_file { get; set; }


        public ExportRules SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}